function addressService($http) {

    

    function addCustomerAddr(addressInfo, callback) {
        var config = {

        };
        console.log(addressInfo);
        $http.post("/o2o/customer/updateInfo", addressInfo, config)
            .then(function (res) {
                console.log(res);
                callback(null, res.data);
            })
            .catch(function (err) {
                console.error(err);
                callback(err, null);
            });
    }

    function getAllAddressList(id,callback){
         $http.get("/o2o/customer/findCustomerById/"+id)
            .then(function (res) {
                console.log(res);
                callback(null, res.data);
            })
            .catch(function (err) {
                console.error(err);
                callback(err, null);
            });
    }






    return {
        addCustomerAddr: addCustomerAddr,
        getAllAddressList:getAllAddressList
    }




}

module.exports = addressService;